<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加</title>
</head>
<body>
<form class="user" name="hospitalAdd" method="post" th:action="@{/hospital/add}" th:object="${hospital}">
    <input type="hidden" id="id" name="id" th:value="${hospital?.id}">
    <div >
        <div >
            医院名称：
            <input type="text"  th:field="*{hospitalName}" placeholder="医院名称">
            <span style="color:red" th:if="${#fields.hasErrors('*{hospitalName}')}" th:errors="*{hospitalName}"></span>
        </div>
    </div>

    <div >
        <div >
            联系电话：
            <input type="text"  th:field="*{mobile}" placeholder="联系电话">
            <span style="color:red" th:if="${#fields.hasErrors('*{mobile}')}" th:errors="*{mobile}"></span>
        </div>
        <div >
            联系人：
            <input type="text" th:field="*{contactPerson}" placeholder="联系人">
            <span style="color:red" th:if="${#fields.hasErrors('*{contactPerson}')}" th:errors="*{contactPerson}"></span>
        </div>
    </div>
    <div >
        <div >
            已用床位：<input type="text"  id="useBeds" name="useBeds" placeholder="已用床位" th:value="${hospital?.useBeds}">
        </div>
    </div>
    <div >
        <div >
            医院地址：<input type="text"  id="address" name="address" placeholder="医院地址" th:value="${hospital?.address}">
        </div>
    </div>

    <input type="submit" value="添加/修改" class="btn btn-success" >
</form>

</body>
</html>